package ru.vba.pojo;

public class Cell {
	private int posX;
	private int posY;
	private Bonus bonus;
	public int getPosX() {
		return posX;
	}
	public int getPosY() {
		return posY;
	}
	public Bonus getBonus() {
		return bonus;
	}
	public void setPosX(int posX) {
		this.posX = posX;
	}
	public void setPosY(int posY) {
		this.posY = posY;
	}
	public void setBonus(Bonus bonus) {
		this.bonus = bonus;
	}
	@Override
	public boolean equals(Object obj) {
		if (!(obj instanceof Cell)){
			throw new IllegalArgumentException();
		}
		Cell cell = (Cell) obj;
		return cell.posX == this.posX && cell.posY == this.posY;
	}
	@Override
	public int hashCode() {
		return (this.posX << 2) * (this.posY << 2);
	}
}
